<template>
  <div class="check" @click="handleCheck">
    <img v-show="!isCheck" src="@/assets/img/enter/check-off.png" />
    <img v-show="isCheck" src="@/assets/img/enter/check-on.png" />
  </div>
</template>

<script lang="ts" setup>
import { ref } from "vue";

const emit = defineEmits(["check"]);

const isCheck = ref(false);

const handleCheck = () => {
  isCheck.value = !isCheck.value;
  emit("check", isCheck.value);
};
</script>

<script lang="ts">
export default {
  name: "CheckButton",
};
</script>

<style lang="scss" scoped>
.check {
  display: inline-block;
}
img {
  height: 42px;
  width: 42px;
}
</style>
